-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Skip installing outlines dependencies mlx, vllm, torch on Intel Macs #3312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pyproject.toml
Outdated
| outlines-mlxlm = ["pydantic-ai-slim[outlines-mlxlm]=={{ version }}"] | ||
| outlines-sglang = ["pydantic-ai-slim[outlines-sglang]=={{ version }}"] | ||
| outlines-vllm-offline = ["pydantic-ai-slim[outlines-vllm-offline]=={{ version }}"] | ||
| outlines-vllm-offline = ["pydantic-ai-slim[outlines-vllm-offline]=={{ version }} ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we need it here as well? I think having it just in the slim package would be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct, removed in 863f131
pydantic_ai_slim/pyproject.toml
Outdated
| outlines-mlxlm = ["outlines[mlxlm]>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64')"] | ||
| outlines-sglang = ["outlines[sglang]>=1.0.0, <1.3.0", "pillow"] | ||
| outlines-vllm-offline = ["vllm; python_version < '3.12'", "outlines>=1.0.0, <1.3.0"] | ||
| outlines-vllm-offline = ["vllm; python_version < '3.12' and ((sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win'))", "torch; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "outlines>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to verify: Is this necessary for all of them, not just mlxlm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, it is not necessary for outlines-llamacpp, others need to stay because multiple libs are problematic (mlxml, torch, ray)
pydantic_ai_slim/pyproject.toml
Outdated
| outlines-transformers = ["outlines[transformers]>=1.0.0, <1.3.0", "transformers>=4.0.0", "pillow"] | ||
| outlines-llamacpp = ["outlines[llamacpp]>=1.0.0, <1.3.0"] | ||
| outlines-mlxlm = ["outlines[mlxlm]>=1.0.0, <1.3.0"] | ||
| outlines-transformers = ["outlines[transformers]>=1.0.0, <1.3.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "transformers>=4.0.0 ; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')", "pillow", "torch; (sys_platform == 'linux') or (sys_platform == 'darwin' and platform_machine == 'arm64') or (sys_platform == 'win')"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should win be win32 considering https://docs.python.org/3/library/sys.html#sys.platform?
Would it be possible to state only the platform we don't support, rather than having to exhaustively list those we do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, I changed it to list platforms that are not supported in 863f131
Closes #3311
Recent PR added some dependancies that don't have builds for Intel MacBooks, so as per suggestion by @DouweM I added environment markers to skip installation for problematic libraries on Intel Macs.